﻿using PublicCommon;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace T_settlement.Domain
{
    /// <summary>
    /// 应付费用
    /// </summary>
    /// 
    [Table("PayMoney")]
    public class PayMoney:Audit
    {
        /// <summary>
        /// 应付费用ID
        /// </summary>
        [Key]
        public int PayMoneyId { get; set; }

        /// <summary>
        /// 业务单号
        /// </summary>
        [StringLength(50)]
        public string? Number { get; set; }


        /// <summary>
        ///外协单位
        /// </summary>
        /// 
        [StringLength(50)]
        public string? Outsourcing { get; set; }

        /// <summary>
        /// 支付方式
        /// </summary>
        public int? PayType { get; set; }

        [NotMapped]
        public string? PayTypeChange
        {
            get
            {

                if (PayType == 1)
                {
                    return "微信支付";
                }
                else if (PayType == 2)
                {
                    return "支付宝支付";
                }
                else if (PayType == 3)
                {
                    return "银联支付";
                }
                else if (PayType == 4)
                {
                    return "企业转账";

                }
                else if (PayType == 5)
                {
                    return "线下支付";
                }
                else
                {
                    return "其他";
                }
            }
        }
        /// <summary>
        /// 吨位
        /// </summary>
        public decimal? Tonnage { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public decimal? NnitPrice { get; set; }

        /// <summary>
        /// 金额
        /// </summary>
        public decimal? Amount { get; set; }

        /// <summary>
        /// 业务日期
        /// </summary>
        public DateTime? BusinessTime { get; set; }

        /// <summary>
        /// 经办人
        /// </summary>
        /// 
        [StringLength(50)]
        public string? Attn { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(300)]
        public string? Remark { get; set; }

        /// <summary>
        /// 核对状态
        /// </summary>
        public int CheckState { get; set; }
    }
}
